package org.jetnuke.common;

public class ActionForward {
	String absPath;

	public ActionForward(String absPath) {
		this.absPath = absPath;
	};

	/**
	 * @param info
	 * @param string
	 */
	public ActionForward(IModuleInfo info, String templateName) {
		if (templateName == null)
			absPath = null;
		else
			absPath = info.getPath() + templateName;
	}

	/**
	 * @return
	 */
	public String getPath() {

		return absPath;
	};

	public ActionForward(String op, IModuleInfo info) {
		if (op == null)
			op = "";
		String pg = info.getPage(op);
		if (pg == null || pg.length() == 0)
			absPath = null;
		else
			absPath = info.getPath() + pg;
	}
}
